<%@ page import="com.youtills.resource.HttpEditResourceController" %>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%--@elvariable id="controller" type="com.youtills.resource.HttpEditResourceController"--%>
<%@ include file="/WEB-INF/jsp/include/taglibs.jsp"%>
<div style="text-align: center; font-size: 1.5em;">Edit Resource (${controller.resource.resourceType})</div>
<form action="<%=HttpEditResourceController.EDIT_CONTROLLER%>" method="post">

    <c:if test="${controller.resource != null}">
        <input type="hidden" name="resourceId" value="${controller.resource.resourceId}">
        <input type="hidden" name="resourceType" value="${controller.resource.resourceType}">

        <c:forEach items="${controller.resource.attributeValues}" var="attribute">
            <div><label>${attribute.name} :
                <input type="text" name="${attribute.name}" value="${attribute.value}">
            </label>
            </div>
        </c:forEach>
    </c:if>

    <input type="submit" name="action" value="Save"/>
</form>
